<script setup>

// eslint-disable-next-line no-undef
const props = defineProps(["menus"])

console.log(props.menus)
</script>

<template>
 <template v-for="item in props.menus" :key="item">
     <el-sub-menu :index="item.component" v-if="item.chillist.length>0">
       <template #title>
         <el-icon>
           <component :is="item.icon"></component>
         </el-icon>
         <span>{{item.menuName}}</span>
       </template>
       <MenuChild :menus="item.chillist"></MenuChild>
     </el-sub-menu>

   <el-menu-item v-else :index="item.component">
     <el-icon>
       <component :is="item.icon"></component>
     </el-icon>
     <span>{{item.menuName}}</span>
   </el-menu-item>
 </template>

</template>

<style scoped lang="scss">

</style>